package com.thoughtworks.recruit.test.jgraph.interfaces;

/**
 * An edge factory used by graphs for creating new edges.
 *
 * @param <V> the graph vertex type
 * @param <E> the graph edge type
 *
 */
public interface EdgeFactory<V, E>
{
    /**
     * Creates a new edge whose endpoints are the specified source and target vertices.
     *
     * @param sourceVertex the source vertex.
     * @param targetVertex the target vertex.
     *
     * @return a new edge whose endpoints are the specified source and target vertices.
     */
    E createEdge(V sourceVertex, V targetVertex);
}
